{include file="common/header.tpl"}
{if $AppUI->id <= 0}
	{include file="index/login.tpl"}  
{else}
	{include file="common/menu.tpl"}
    <div class="rightColumn">
    	<div class="boxContent">
        	<div class="contentItem">
                <div class="contentItems">
                	{if $intStatuses >= 0}
                		<div class="headerTitle">
                        	<h2>
                            	{if $refer != ""}
                            		<a href="{$refer}">Quay về trang trước</a>
                               	{else}
                                	<a href="{$smarty.const.HOST_BACKEND}place/{if $row.statuses == 0}waiting{elseif $row.statuses == 1}index{elseif $row.statuses == 2}report{elseif $row.statuses == 3}unaccept{elseif $row.statuses == 4 && $AppUI->type > 0}delete{else}index{/if}">Ăn - Chơi</a>
                                {/if}
                                &raquo; Chi tiết
                           	</h2>
                       	</div>
                    {/if} 
                    <div class="secData">
                    	<table width="100%" cellpadding="0" cellspacing="0" border="0">
                        	<thead>
                            	<tr>
                                	<th width="20%">Trường dữ liệu</th>
                                    <th>Thông tin</th>
                                </tr>
                            </thead>
                            <tbody>
                            	<tr class="odd">
                                	<td>Mã:</td>
                                    <td><strong>{$row.placeid}</strong></td>
                                </tr>
                                <tr class="even">
                                	<td>Tiêu đề:</td>
                                    <td><strong>{$row.name}</strong></td>
                                </tr>
                            	<tr class="odd">
                                	<td>Đăng bởi:</td>
                                    <td><strong><a href="{$smarty.const.HOST_BACKEND}user/detail?userid={$row.userid}">{$row.userid|ouser}</a></strong></td>
                                </tr>
                                <tr class="even">
                                	<td>Nội dung:</td>
                                    <td class="content">
                                    	{if $row.content == ""}
                                        	----//----
                                        {else}
	                                    	{$row.content}
                                       	{/if}
                                    </td>
                                </tr>
                                <tr class="odd">
                                	<td>Hình minh họa:</td>
                                    <td class="img">
                                    	{if $arrImage}
                                            <ul>
                                                {foreach item=item from=$arrImage}
                                                    <li>
                                                        {image path=$item.image type=7 small=1}<br/>
                                                        <a href="{$smarty.const.HOST_BACKEND}user/detail?userid={$item.userid}">{$item.userid|ouser}</a><br/>
                                                        {if $item.statuses == 0}
                                                            Chưa duyệt {if ($smarty.session.place&1<<5) > 0}| <a href="{$smarty.const.HOST_BACKEND}place/act?paction=6&amp;placeid={$row.placeid}&amp;pimageid={$item.pimageid}&amp;refer={$refer|base64E}&amp;de=1&amp;uid={$row.userid}">Duyệt</a> {/if}{if ($smarty.session.place&1<<3) > 0}| <a href="javascript:actHasConfirm(1,'{$smarty.const.HOST_BACKEND}place/act?paction=7&amp;placeid={$row.placeid}&amp;pimageid={$item.pimageid}&amp;refer={$refer|base64E}&amp;de=1&amp;uid={$item.userid}');">Xóa</a> {if $AppUI->type > 1}| <a href="javascript:actHasConfirm(2,'{$smarty.const.HOST_BACKEND}place/act?paction=8&amp;placeid={$row.placeid}&amp;pimageid={$item.pimageid}&amp;refer={$refer|base64E}&amp;de=1&amp;uid={$item.userid}');"> Xóa khỏi db</a>{/if}{/if}
                                                        {elseif $item.statuses == 1}
                                                            Đã duyệt {if ($smarty.session.place&1<<3) > 0}| <a href="javascript:actHasConfirm(1,'{$smarty.const.HOST_BACKEND}place/act?paction=7&amp;placeid={$row.placeid}&amp;pimageid={$item.pimageid}&amp;refer={$refer|base64E}&amp;de=1&amp;uid={$item.userid}');">Xóa</a> {if $AppUI->type > 1}| <a href="javascript:actHasConfirm(2,'{$smarty.const.HOST_BACKEND}place/act?paction=8&amp;placeid={$row.placeid}&amp;pimageid={$item.pimageid}&amp;refer={$refer|base64E}&amp;de=1&amp;uid={$item.userid}');"> Xóa khỏi db</a>{/if}{/if}
                                                        {elseif $item.statuses|abs == 2}
                                                            {if $item.statuses == 2}Owner xóa{else}User xóa{/if} {if ($smarty.session.place&1<<5) > 0}| <a href="{$smarty.const.HOST_BACKEND}place/act?paction=6&amp;placeid={$row.placeid}&amp;pimageid={$item.pimageid}&amp;refer={$refer|base64E}&amp;de=1&amp;uid={$row.userid}">Phục hồi</a> {/if}{if ($smarty.session.place&1<<3) > 0}| <a href="javascript:actHasConfirm(1,'{$smarty.const.HOST_BACKEND}place/act?paction=7&amp;placeid={$row.placeid}&amp;pimageid={$item.pimageid}&amp;refer={$refer|base64E}&amp;de=1&amp;uid={$item.userid}');">Xóa</a> {if $AppUI->type > 1}| <a href="javascript:actHasConfirm(2,'{$smarty.const.HOST_BACKEND}place/act?paction=8&amp;placeid={$row.placeid}&amp;pimageid={$item.pimageid}&amp;refer={$refer|base64E}&amp;de=1&amp;uid={$item.userid}');"> Xóa khỏi db</a>{/if}{/if}
                                                        {elseif $item.statuses == 3}
                                                            Admin xóa{if $AppUI->type > 1 && ($smarty.session.place&1<<3) > 0} | <a href="javascript:actHasConfirm(2,'{$smarty.const.HOST_BACKEND}place/act?paction=8&amp;placeid={$row.placeid}&amp;pimageid={$item.pimageid}&amp;refer={$refer|base64E}&amp;de=1&amp;uid={$item.userid}');"> Xóa khỏi db</a>{/if}
                                                        {elseif $item.statuses == 4}
                                                            Vi phạm {if ($smarty.session.place&1<<5) > 0}| <a href="{$smarty.const.HOST_BACKEND}place/act?paction=6&amp;placeid={$row.placeid}&amp;pimageid={$item.pimageid}&amp;refer={$refer|base64E}&amp;de=1&amp;uid={$row.userid}">Gỡ bỏ</a> {/if}{if ($smarty.session.place&1<<3) > 0}| <a href="javascript:actHasConfirm(1,'{$smarty.const.HOST_BACKEND}place/act?paction=7&amp;placeid={$row.placeid}&amp;pimageid={$item.pimageid}&amp;refer={$refer|base64E}&amp;de=1&amp;uid={$item.userid}');">Xóa</a> {if $AppUI->type > 1} |<a href="javascript:actHasConfirm(2,'{$smarty.const.HOST_BACKEND}place/act?paction=8&amp;placeid={$row.placeid}&amp;pimageid={$item.pimageid}&amp;refer={$refer|base64E}&amp;de=1&amp;uid={$item.userid}');"> Xóa khỏi db</a>{/if}{/if}
                                                        {/if}
                                                    </li>
                                                {/foreach}
                                            </ul>
                                        {else}
                                        	----//----
                                        {/if}
                                   	</td>
                                </tr>
                                <tr class="even">
                                	<td>Yêu thích</td>
                                    <td><strong>{$row.tlike|number_format:"0":",":"."}</strong></td>
                                </tr>
                                <tr class="odd">
                                	<td>Bình luận:</td>
                                    <td><strong>{$row.tcmt|number_format:"0":",":"."}</strong></td>                                	
                                </tr>
                                <tr class="even">
                                	<td>Báo vi phạm:</td>
                                    <td><strong>{$row.treport}</strong></td>
                                </tr>
                                <tr class="odd">
                                	<td>Ngày đăng:</td>
                                    <td><strong>{$row.postdate|date_format:"%d/%m/%Y %H:%M:%S"}</strong></td>
                                </tr>
                                <tr class="even">
                                	<td>Tình trạng:</td>
                                    <td>
                                    	{if $row.statuses == 0}
                                        	<strong>Chờ duyệt</strong>
                                       	{elseif $row.statuses == 1}
	                                        <strong>BQT duyệt</strong>
                                       	{elseif $row.statuses == 2}
                                        	<strong>Báo vi phạm</strong>
                                       	{elseif $row.statuses == 3}
                                        	<strong>BQT không duyệt</strong>
                                       	{elseif $row.statuses == 4}
                                        	<strong>BQT xóa</strong>
                                       	{/if}
                                   	</td>
                                </tr>
                                <tr class="odd">
                                	<td>&nbsp;</td>
                                    <td>
                                    	{if ($smarty.session.place&1<<5) > 0}
                                            {if $row.treport == 0}
                                                {if $row.statuses == 0}
                                                    <a href="{$smarty.const.HOST_BACKEND}place/act?paction=1&amp;placeid={$row.placeid}&amp;refer={$refer|base64E}&amp;de=1&amp;uid={$row.userid}" class="btn">Duyệt</a>
                                                {elseif $row.statuses == 2 || $row.statuses == 3 || ($row.statuses == 4 && $AppUI->type > 1)}
                                                    <a href="{$smarty.const.HOST_BACKEND}place/act?paction=1&amp;placeid={$row.placeid}&amp;refer={$refer|base64E}&amp;de=1&amp;uid={$row.userid}" class="btn">Phục hồi</a>
                                                {/if}
                                            {else}
                                                <a href="{$smarty.const.HOST_BACKEND}place/act?paction=5&amp;placeid={$row.placeid}&amp;refer={$refer|base64E}&amp;de=1&amp;uid={$row.userid}" class="btnLarge">Gỡ bỏ vi phạm</a>
                                            {/if}
                                        {/if}    
                                        {if ($smarty.session.place&1<<4) > 0 && $row.treport == 0 && $row.statuses < 2}
                                        	<a href="{$smarty.const.HOST_BACKEND}place/act?paction=3&amp;placeid={$row.placeid}&amp;refer={$refer|base64E}&amp;de=1&amp;uid={$row.userid}" class="btn">Không duyệt</a>
                                        {/if}  
                                        {if ($smarty.session.place&1<<3) > 0} 
                                            <a href="javascript:actHasConfirm(1,'{$smarty.const.HOST_BACKEND}place/act?paction=2&amp;placeid={$row.placeid}&amp;refer={$refer|base64E}&amp;de=1&amp;uid={$row.userid}');" class="btn">Xóa</a> 
                                            {if $AppUI->type > 1}
                                                <a href="javascript:actHasConfirm(2,'{$smarty.const.HOST_BACKEND}place/act?paction=4&amp;placeid={$row.placeid}&amp;refer={$refer|base64E}&amp;de=1&amp;uid={$row.userid}');" class="btnLarge">Xóa khỏi database</a> 
                                            {/if}
                                        {/if}                         	
                                        {*if ($smarty.session.place&1<<2)>0}
                                        	<a href="{$smarty.const.HOST_BACKEND}place/edit?placeid={$row.placeid}" class="btn">Chỉnh sửa</a>
                                        {/if*}
                                 	</td>
                                </tr>                                
                            </tbody>
                        </table>
                    </div>
                </div>
          	</div>
        </div>
    </div>
{/if}
{include file="common/footer.tpl"}
                
